<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="decorator :: common_header(~{::'title/text()'},~{::customHead})">
    <title>商品图片上传</title>
    <!--/*/ <th:block th:fragment="customHead" > /*/-->

    <link rel="stylesheet" href="lib/dropzone/dropzone.min.css">
    <link href="lib/switch/bootstrap-switch.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css"
          href="lib/adminLTE/bootstrap-select/css/bootstrap-select.css"/>

    <!--/*/ </th:block > /*/-->
</head>
<body th:replace="decorator :: common_body(~{::mainBody},~{::tailScript})">
<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="mainBody" >  /*/-->
<div class="box box-primary upload " th:with="storageLevel=${'pub'}">

    <div class="box-header with-border">
        <h3 class="box-title">商品图片上传</h3>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
        </div><!-- /.box-tools -->
    </div><!-- /.box-header -->

    <div class="box-body">

        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label class="control-label"><i class="fa"></i>上传目录</label>
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default url-prefix" type="button">
	                            <span class="prefix" th:text="${pertten}">http://sinacloud.net/finance-documents</span>/</button>
                        </span>
                    </div>
                    <span class="help-block"></span>
                </div>
            </div>
            <div class="col-md-2">
                <div class="form-group">
                    <label class="control-label"><i class="fa"></i>所属商品</label>
                    <select id="goods" name="goods" class="selectpicker show-tick form-control">
                        <option th:each="goods:${list}" th:value="${goods.id}" th:text="${goods.name}"></option>
                    </select>
                </div>
            </div>
            <div class="col-md-2">
                <div class="form-group">
                    <label class="control-label"><i class="fa"></i>名字</label>
                    <input id="gname" name="name" type="text" placeholder="名字"
                           class="form-control field"/>
                </div>
            </div>
            <div class="col-md-2">
                <div class="form-group">
                    <label class="control-label"><i class="fa"></i>排序</label>
                    <input id="sort1" name="sort" type="text" placeholder="排序"
                           class="form-control field"/>
                </div>
            </div>

        </div>

        <form id="uploadForm" action="storageGoodsPhoto/goodsPhoto/upload" class="dropzone text-primary upload"
              method="post"
              enctype="multipart/form-data" style="min-height: 300px">
            <input type="hidden" name="content" value="json"/>
            <input type="hidden" name="directory"/>
            <input type="hidden" name="storageLevel" th:value="${storageLevel}">
            <input type="hidden" name="id" id="id">
            <input type="hidden" name="name" id="name">
            <input type="hidden" name="sort" id="sort">
        </form>

    </div> <!-- /.box-body -->
</div><!-- /.box -->

<!--/*/ </th:block>  /*/-->


<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="tailScript" > /*/-->
<script src="lib/switch/bootstrap-switch.js" defer="defer"></script>
<script src="lib/dropzone/dropzone.min.js" defer="defer"></script>
<script src="lib/adminLTE/bootstrap-select/js/bootstrap-select.js" defer="defer"></script>
<script src="js/util/DataUtils.js" defer="defer"></script>
<script src="js/storage/goodsPhotoUpload.js" defer="defer"></script>
<!--/*/ </th:block>  /*/-->
</body>
</html>